package com.smt.ejb3.tutoria.usertransaction;

import javax.ejb.Remote;
import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

@Stateless
@Remote
public class CatManagerBean implements CatManager {

	@PersistenceContext(unitName = "ejb3db")
	private EntityManager em;
	
	@Override
	public void saveCat(String name) {
		Cat c = new Cat();
		c.setName(name);
		em.persist(c);
	}

}
